@echo off
chcp 65001
REM 下载wget https://eternallybored.org/misc/wget/releases/wget-1.20.3-win64.zip
REM 启动浏览器,进行下载
start https://www.oracle.com/java/technologies/downloads/#java8-windows
REM 解压后,直接配置环境变量即可
set INSTALL_PATH="D:\environment\wget-1.21.4-win64"
REM pause
if not exist "%INSTALL_PATH%" (
    echo %INSTALL_PATH%文件不存在，请检查路径是否正确！
	echo "https://eternallybored.org/misc/wget/releases/wget-1.21.4-win64.zip 网站下载"
	pause
)
REM 设置 WGET_HOME 用户变量
setx -m WGET_HOME "%INSTALL_PATH%"
echo "要配置的环境变量为 %WGET_HOME%"

REM 追加环境变量至用户环境变量PATH中
REM setx PATH "%PATH%;%WGET_HOME%" /M
setx PATH "%PATH%;%WGET_HOME%" /m
REM setx PATH "%user_path_var%;%new_path%"
pause